//
//  ShareView.m
//  Pictorial
//
//  Created by SKY on 15/12/30.
//  Copyright © 2015年 sky. All rights reserved.
//

#import "ShareView.h"

@interface ShareView ()

@property (weak, nonatomic) IBOutlet UIToolbar *toolBar;

@end

@implementation ShareView

-(void)willMoveToSuperview:(UIView *)newSuperview{
    self.frame = newSuperview.bounds;
    
    self.toolBar.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(cancle:)];
    [self.toolBar addGestureRecognizer:tap];
}
- (IBAction)share:(UIButton *)sender {
    
    [self removeFromSuperview];
    [_delegate shareWithType:sender.tag];
    
}
- (IBAction)cancle:(id)sender {
    [self removeFromSuperview];
}

@end
